#include<iostream>
#include<string>
using namespace std;
string fun1(string str,int k){
    long long s,r=0;
    for(int i=str.length()-1;i>=0;i--)
        if(str[i]!='.'){
            s=(str[i]-'0')*k+r;
            str[i]=(s%10+'0');
            r=s/10;
        }while(r){
            str=(char)(r%10+'0')+str;
            r/=10;
        }
    return str;
}
string fun2(string str){
    long long s,r=0;
    string num="";
    bool flag=false;
    for(int i=str.length()-1;i>=0;i--)
        if(str[i]=='.')flag=true;
        else if(!flag){
            s=str[i]-'0'+r;
            r=s/10;
            s%=10;
            if(s>4)r+=1;
        }else if(flag){
            s=str[i]-'0'+r;
            num=(char)(s%10+'0')+num;
            r=s/10;
        }while(r){
            num=(char)(r%10+'0')+num;
            r/=10;
        }
    return num;
}
int main(){
    int n;
    string num;
    cin>>n>>num;
    while(n--)
        num=fun1(num,2);
    cout<<num<<endl;
    cout<<fun2(num)<<endl;
    return 0;
}